home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_pow_vest.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
1KB
|
71 lines
# Jedi Knight Cog Script
#
# POW_VEST.COG
#
# POWERUP Script - Armor Vest
#
# [YB & CYW]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing powerup local
thing player local
int bin=60 local
sound pickupsnd=helthpu1.wav local
sound respawnsnd=Activate01.wav local
flex amount local
message touched
message taken
message respawn
end
# ========================================================================================
code
touched:
player = GetSourceRef();
amount = GetInv(player, bin);
if (amount < GetInvMax(player, bin))
{
TakeItem(GetSenderRef(), -1);
call taken;
}
Return;
# ........................................................................................
taken:
player = GetSourceRef();
powerup = GetSenderRef();
// Print("Armor Vest");
jkPrintUNIString(player, 207);
// Do effects.
PlaySoundLocal(pickupsnd, 1, 0, 0);
AddDynamicTint(player, 0.0, 0.0, 0.2);
// Max the shields.
ChangeInv(player, bin, GetInvMax(player, bin));
Return;
# ........................................................................................
respawn:
PlaySoundThingLocal(respawnsnd, GetSenderRef(), 0.6, 5.0, 10.0, 0);
Return;
end